/**
 * Copyright (C), 2023-2033
 */
package com.goaly.consts;

import java.util.Map;
import org.apache.groovy.util.Maps;

/**
 * 测试代码相关常量
 *
 * @author: lys
 * @date: 2023/6/20 7:43
 */
public class TestCodeConstant {

    private TestCodeConstant() {
    }

    /**
     * JUnit4相关包
     */
    public static final String JUNIT4_IMPORTS = "import org.junit.Test;\n"
            + "import org.junit.runner.RunWith;\n"
            + "import org.springframework.test.context.junit4.SpringRunner;\n";

    /**
     * JUnit5相关包
     */
    public static final String JUNIT5_IMPORTS = "import org.junit.jupiter.api.Test;\n"
            + "import org.junit.jupiter.api.extension.ExtendWith;\n"
            + "import org.springframework.test.context.junit.jupiter.SpringExtension;\n";

    /**
     * JUnit4 的 Test 注解
     */
    public static final String ANNO_TEST_4 = "org.junit.Test";

    /**
     * JUnit5 的 Test 注解
     */
    public static final String ANNO_TEST_5 = "org.junit.jupiter.api.Test";

    /**
     * JUnit4 的 Before 注解
     */
    public static final String ANNO_BEFORE_4 = "org.junit.Before";

    /**
     * JUnit5 的 BeforeEach 注解
     */
    public static final String ANNO_BEFORE_EACH_5 = "org.junit.jupiter.api.BeforeEach";

    /**
     * 导入JUnit4的Test注解
     */
    public static final String IMPORT_TEST_4 = "import org.junit.Test;";

    /**
     * 导入JUnit5的Test注解
     */
    public static final String IMPORT_TEST_5 = "import org.junit.jupiter.api.Test;";

    /**
     * JUnit的基础包
     */
    public static final String BASE_PACKAGE_TEST = "org.junit";

    /**
     * JUnit5的基础包
     */
    public static final String BASE_PACKAGE_TEST_5 = "junit.jupiter";

    /**
     * 不同Test注解 与 版本对应关系
     */
    public static final Map<String, String> ANNO_TEST_2_VERSION = Maps.of(
            ANNO_TEST_4, "4",
            ANNO_TEST_5, "5"
    );


}